//
//  YJImmediatelygrabController.m
//  SnackCourier
//
//  Created by qianfeng01 on 15/7/21.
//  Copyright (c) 2015年 qianfeng01. All rights reserved.
//

#import "YJImmediatelygrabController.h"
#import "UMSocial.h"

@interface YJImmediatelygrabController ()<UMSocialUIDelegate>

@end

@implementation YJImmediatelygrabController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self createNavigationItem];
}

-(void)createNavigationItem{
    [self.navigationItem setHidesBackButton:YES];
    UIBarButtonItem *rightItem =[[UIBarButtonItem alloc] initWithTitle:@"" style:(UIBarButtonItemStylePlain) target:self action:@selector(rightClick)];
    [rightItem setImage:[[UIImage imageNamed:@"shareIcon"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)]];
    self.navigationItem.rightBarButtonItem =rightItem;
    
    UIBarButtonItem *leftItme =[[UIBarButtonItem alloc] initWithTitle:@"" style:(UIBarButtonItemStylePlain) target:self action:@selector(leftClick)];
    [leftItme setImage:[[UIImage imageNamed:@"backIcon"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)]];
    self.navigationItem.leftBarButtonItem =leftItme;
    
}

-(void)rightClick{
    [UMSocialSnsService presentSnsIconSheetView:self appKey:@"55ada28f67e58ef8c00054cc" shareText:@"零食工厂" shareImage:[UIImage imageNamed:@""] shareToSnsNames:@[UMShareToEmail,UMShareToSms,UMShareToSina,UMShareToRenren] delegate:self];
}
-(void)leftClick{
    [self.navigationController popViewControllerAnimated:YES];
}
-(BOOL)isDirectShareInIconActionSheet{
    return YES;
}

@end
